﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Ultilities
{
    public class ErpMessageBoxEX
    {
        // Fields
        private static frmShowMessageDialog frmMsgbox;

        // Methods
        public static DialogResult Show(string text)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(text, " ", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(owner, text, " ", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption, MessageBoxButtons msgButtons)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(text, caption, msgButtons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(owner, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(text, caption, msgButtons, msgIcons, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons msgButtons)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(owner, text, caption, msgButtons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons, MessageBoxDefaultButton msgDefaultButton)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(text, caption, msgButtons, msgIcons, msgDefaultButton);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(owner, text, caption, msgButtons, msgIcons, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons, MessageBoxDefaultButton msgDefaultButton)
        {
            frmMsgbox = new frmShowMessageDialog();
            return frmMsgbox.ShowDialog(owner, text, caption, msgButtons, msgIcons, msgDefaultButton);
        }
    }

 

}
